﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SME.Food.Surperise.Model;
using SME.Food.Surperise.BLL;

namespace SME.Food.Tricon.Web.AdminJS.DishesManage
{
    public partial class DishesModify : System.Web.UI.Page
    {
        public string hid = "";
        public int id, postId;
        public string Dishes_No = ""
            , Dishes_Name = ""
            , Dishes_Statue = ""
            , Dishes_Price =""
            , type = "";

        Bas_Dishes_BLL bll = new Bas_Dishes_BLL();

        protected void Page_Load(object sender, EventArgs e)
        {
            type = Request.QueryString["type"];
            if (type == "update")
            {
                hid = "update";
                Show();
            }
            else
            {
                hid = "add";
            }

        }

        public void Show()
        {
            Dishes_No = Request.QueryString["Dishes_No"];
            Bas_Dishes_Model model = bll.GetModel(Dishes_No);
            if (model != null)
            {
                Dishes_No = model.Dishes_No;
                Dishes_Name = model.Dishes_Name;
                Dishes_Statue =model.Dishes_statue.ToString();
                Dishes_Price = model.Dishes_Price.ToString();
              
            }
        }
    }
}